//
// Created by Joey on 2019/12/14.
//
#include<iostream>

using namespace std;


int main() {
    int arr[] = {4, 2, 8, 6, 9, 3, 0, 1, 7, 5};

    for (int i = 0; i < 9; ++i) {
        for (int j = 0; j < 9 - i; ++j) {
            if (arr[j] > arr[j + 1]) {
                int tmp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = tmp;
            }
        }
    }

    for (int k = 0; k <= 9; ++k) {
        cout << arr[k] << " ";
    }
    cout << endl;
}

